//
//  Topic.m
//  Zaker
//
//  Created by dllo on 16/3/14.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "Topic.h"

@implementation Topic

- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}
+ (instancetype)modelWithDic:(NSDictionary *)dic
{
    return [[[self class] alloc] initWithDic:dic];
}
+ (NSMutableArray *)modelHandlerWithArray:(NSArray *)arr
{
    NSMutableArray *mArr = [NSMutableArray array];
    for (NSDictionary *dic in arr) {
        [mArr addObject:[[self class] modelWithDic:dic]];
    }
    return mArr;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"description"]) {
        self.expertDescription = value;
    }
}

// Insert code here to add functionality to your managed object subclass

@end
